﻿using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace QL_NOI_TRU
{
    public partial class frmNhapDSDonGiaCLS : DevExpress.XtraEditors.XtraForm
    {
        public frmNhapDSDonGiaCLS()
        {
            InitializeComponent();
        }

        private void frmNhapDSDonGiaCLS_Load(object sender, EventArgs e)
        {
            var kn = new Ketnoi(frmDangnhap.stringConn);
            gridControl1.DataSource = kn.ExcuteQuery("select * from DGIA");

            var a = "select * from DV_CAN_LAM_SANG";
            SqlConnection conn = new SqlConnection(frmDangnhap.stringConn);
            SqlCommand cm = conn.CreateCommand();
            cm.CommandText = a;
            conn.Open();
            SqlDataReader dr = cm.ExecuteReader();
            while (dr.Read())
            {
                cbbMaDV.Properties.Items.Add(String.Format("{0} | {1}", dr["MADV"], dr["TENDV"]));
            }
        }

        private void cbbMaDV_SelectedIndexChanged(object sender, EventArgs e)
        {
            string M_dv = cbbMaDV.SelectedItem.ToString().Substring(0, 4);

        }
    }
}